function isPerfectSquare(n) {
  const squareRoot = Math.sqrt(n);
  if (Math.floor(squareRoot) === squareRoot) {
    return true;
  } else {
    return false;
  }
}


console.log(Math.sqrt(-1))